//
//  main.c
//  实现函数init() 初始化数组为全0 实现print()  打印数组的每个元素 实现reverse()  函数完成数组元素的逆置
//
//  Created by 卜绎皓 on 2022/1/22.
//

#include<stdio.h>
int main()
{
    int arr1[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
    int arr2[10] = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
    int i = 0;
    int temp = 0;
    for (i = 0; i < 10; i++){
        temp = arr1[i];
        arr1[i] = arr2[i];
        arr2[i] = temp;
    }
    printf("arr1中交换后的元素：");
    for (i = 0; i < 10; i++){
        printf("%d  ", arr1[i]);
    }
    printf("\n");
    printf("arr2中交换后的元素：");
    for (i = 0; i < 10; i++){
        printf("%d  ", arr2[i]);
    }
    printf("\n");
    return 0;
}

